from django.urls import path
from . import views
from django.views.generic import RedirectView
from django.urls import re_path
urlpatterns =[
    #定义首页的路由
    path('',views.myapp,name='myapp'),
    #添加带有字符类型、整型和slug的路由
    path('<year>/<int:month>/<slug:day>',views.mydate,name='mydate'),
    path('',views.sentence,name='f1'),
    path('<int:n1>/<int:n2>',views.sum,name='f2'),
    path('',views.time,name='f4'),
    path('turnTo', RedirectView.as_view(url='/'),name='turnTo'),

    re_path('(?P<string>(pos-)[0-9]*).html', views.number,name='f3')
   
]